<%-- 
/*
Assignment 1
Class ID        : SE0691
Group           : 1
Due Date        : 20 November 2012
I declare that this assignment is my own work
in accordance with FPT Policy.
*/
--%>

<%@page import="java.util.ArrayList"%>
<%@page import="edu.fpt.dal.NewsDAL"%>
<%@page import="edu.fpt.hib.News"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>News from manager</title>
        <style type="text/css"> <!--@import url("../style.css");--></style>
        <script>function goBack()  {  window.history.back()  }</script>
    </head>
    <body>
        <%@include file="template/header.jsp" %>

        <div id="page">
            
            <div class="post">
                <%
                    ArrayList<News> list = NewsDAL.listAll();
                    if (list != null) {
                        for (News news : list) {
                %>
                <strong>Title:</strong>
                <h3 class="title"><%=news.getNewsTitle()%></h3><br>
                <strong>Content:</strong><br>
                <p><%=news.getNewsContent()%></p><br>
                <strong>Created Date:</strong><br>
                <%=news.getNewsDate()%>
                <hr>
                
                <%}
                    }
                %>
            </div>

        </div>
        <%@include file="template/footer.jsp" %>
    </body>
</html>
